<?php
class M_FaqsCategory extends Apps_Db_Table_Abstract {
    protected $_name = 'faqs_category';

    const STATUS_ACTIVE   = 1;
    const STATUS_INACTIVE = 0;

    // get all Faqs
    public function getAllFaqsCategory() {
    	$q = $this->_db
			    	->select()
			    	->from('faqs_category', null)
			    	->where('faqs_category.status = ?', self::STATUS_ACTIVE)
			    	->columns(array('id' => 'id'));

    	if($this->getLang() == 'en') {
    		$q->columns(array('title' => 'en_title'));
    	} else {
    	    $q->columns(array('title' => 'title'));
    	}

    	return $q;
    }

}